﻿using System;
using DBScript;

namespace eBlog.Entity
{
	/// <summary>
	/// 实体类vt_Posts 。(属性说明自动提取数据库字段的描述信息)
	/// </summary>
	[Serializable]
	public class Posts : DBModel
	{
		public Posts()
		{
			PrimaryKey = "ID"; //主键
			TableName = "Posts"; //对应的数据表
		}

		#region Model 数据库字段映射属性
		//支持子表字段的加入，但属性名称必须要以" Sub_ "开头然后是绝对的字段名

		private int _id;
		private int _typeid;
		private string _title;
		private string _slug;
		private string _imageurl;
		private string _summary;
		private string _content;
		private int? _userid;
		private int? _commentstatus;
		private int? _commentcount;
		private int? _viewcount;
		private string _tag;
		private int? _urlformat;
		private string _template;
		private int? _status;
		private int? _topstatus;
		private DateTime _createdate;
		private DateTime? _updatedate;
		private string _partcode;
		private bool _topshow;
        private string _codename;
        private bool _recommend;


        
        public int ID
		{
			set{ _id=value;}
			get{return _id;}
		}

		public int TypeID
		{
			set{ _typeid=value;}
			get{return _typeid;}
		}

		public string Title
		{
			set{ _title=value;}
			get{return _title;}
		}

		public string Slug
		{
			set{ _slug=value;}
			get{return _slug;}
		}

		public string Imageurl
		{
			set{ _imageurl=value;}
			get{return _imageurl;}
		}

		public string Summary
		{
			set{ _summary=value;}
			get{return _summary;}
		}

		public string Content
		{
			set{ _content=value;}
			get{return _content;}
		}

		public int? UserID
		{
			set{ _userid=value;}
			get{return _userid;}
		}

        /// <summary>
        /// 0=" 静止评论";1="允许评论"
        /// </summary>
		public int? CommentStatus
		{
			set{ _commentstatus=value;}
			get{return _commentstatus;}
		}

		public int? CommentCount
		{
			set{ _commentcount=value;}
			get{return _commentcount;}
		}

		public int? ViewCount
		{
			set{ _viewcount=value;}
			get{return _viewcount;}
		}

		public string Tag
		{
			set{ _tag=value;}
			get{return _tag;}
		}

		public int? UrlFormat
		{
			set{ _urlformat=value;}
			get{return _urlformat;}
		}

		public string Template
		{
			set{ _template=value;}
			get{return _template;}
		}
        /// <summary>
        /// 文章状态，0=“禁用” 1=“正常”
        /// </summary>
		public int? Status
		{
			set{ _status=value;}
			get{return _status;}
		}

        /// <summary>
        /// 是否置顶  0="不置顶" 1="置顶"
        /// </summary>
		public int? TopStatus
		{
			set{ _topstatus=value;}
			get{return _topstatus;}
		}
        /// <summary>
        /// 是否推荐 0=“不推荐” 1=“推荐”
        /// </summary>
        public bool Recommend
        {
            set { _recommend = value; }
            get { return _recommend; }
        }

		public DateTime CreateDate
		{
			set{ _createdate=value;}
			get{return _createdate;}
		}

		public DateTime? UpdateDate
		{
			set{ _updatedate=value;}
			get{return _updatedate;}
		}

		public string PartCode
		{
			set{ _partcode=value;}
			get{return _partcode;}
		}

       /// <summary>
       /// 是否作为轮播新闻  false="不作为轮播" true="做为轮播"
       /// </summary>
		public bool TopShow
		{
			set{ _topshow=value;}
			get{return _topshow;}
		}

        /// <summary>
        /// 用于单页调用是的唯一标志
        /// </summary>
        public string CodeName
        {
            set { _codename = value; }
            get{return _codename;}
        }
		#endregion Model

   
	}
}

